/*
 *  $Id: Summon.cs 898 2009-11-28 16:12:26Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Affects {
    /// <summary>
    /// Эффект: событие призыва существа
    /// Параметры: обработчик события и выборка событий
    /// </summary>
    public class OnCreatureSummon: Event<CreatureEvent> {
        public OnCreatureSummon(CreatureEvent handler, AffectSummaryType sumTypes): base(handler, sumTypes) {}

        public override string Id {
            get { return "event.summon.creature"; }
        }

        public override Affect Clone() {
            return new OnCreatureSummon(Handler, SumTypes);
        }

        public override void SetEvent(AffectSummary summary) {
            summary.OnCreatureSummon += Handler;
        }
        public override void ResetEvent(AffectSummary summary) {
            summary.OnCreatureSummon -= Handler;
        }
    }

    /// <summary>
    /// Эффект: событие призыва местности
    /// Параметры: обработчик события и выборка событий
    /// </summary>
    public class OnLandSummon: Event<LandEvent> {
        public OnLandSummon(LandEvent handler, AffectSummaryType sumTypes): base(handler, sumTypes) {}

        public override string Id {
            get { return "event.summon.land"; }
        }

        public override Affect Clone() {
            return new OnLandSummon(Handler, SumTypes);
        }

        public override void SetEvent(AffectSummary summary) {
            summary.OnLandSummon += Handler;
        }
        public override void ResetEvent(AffectSummary summary) {
            summary.OnLandSummon -= Handler;
        }
    }
}